* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background: #f0f2f5;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
  transition: margin-right 0.3s ease;
}

.container.sidebar-open {
  margin-right: 300px;
}

.header {
  background: white;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.header h1 {
  color: #1877f2;
  font-size: 24px;
  margin-bottom: 10px;
}

.post-form {
  background: white;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.post-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  resize: vertical;
  min-height: 100px;
  margin-bottom: 10px;
}

.post-form textarea::placeholder {
  color: #999;
}

.post-form button {
  background: #1877f2;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.post-form button:hover {
  background: #166fe5;
}

.post {
  background: white;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  margin-bottom: 15px;
}

.post-header {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.post-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 10px;
}

.post-user {
  font-weight: bold;
  cursor: pointer;
}

.post-user:hover {
  color: #1877f2;
}

.post-timestamp {
  color: #65676b;
  font-size: 0.9em;
  margin-left: auto;
}

.post-content {
  margin-bottom: 10px;
  line-height: 1.4;
}

.post-actions {
  display: flex;
  gap: 15px;
  color: #65676b;
  font-size: 0.9em;
}

.post-action {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
}

.post-action:hover {
  color: #1877f2;
}

.post-action.active {
  color: #1877f2;
  font-weight: bold;
}

.likes-count {
  color: #1877f2;
  font-weight: bold;
}

.logographic-text {
  background: none;
  border: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.preview-container .logographic-text {
  background: white;
  padding: 10px;
  border: 1px solid #eee;
  border-radius: 4px;
}

.logograph {
  display: inline-flex;
  align-items: center;
  position: relative;
}

.logograph:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 1000;
}

.logograph svg {
  width: 40px;
  height: 40px;
}

.logograph[title*="."],
.logograph[title*=","],
.logograph[title*="!"],
.logograph[title*="?"],
.logograph[title*=";"],
.logograph[title*=":"],
.logograph[title*="'"],
.logograph[title*="("],
.logograph[title*=")"] {
  transform: scale(0.8);
}

.logograph[title$="ing"] svg,
.logograph[title$="ed"] svg,
.logograph[title$="er"] svg,
.logograph[title$="est"] svg,
.logograph[title$="s"] svg,
.logograph[title="'s"] svg {
  width: 30px;
  height: 30px;
  transform: scale(0.8);
}

.post-timestamp .logograph svg {
  width: 24px;
  height: 24px;
}

.post-actions .logograph svg {
  width: 30px;
  height: 30px;
}

.post-user .logograph svg {
  width: 35px;
  height: 35px;
}

.post-action .logograph svg {
  width: 30px;
  height: 30px;
}

.welcome .logograph svg {
  width: 30px;
  height: 30px;
}

.title {
  font-size: 1.5em;
  margin-bottom: 15px;
}

.title .logograph svg {
  width: 60px;
  height: 60px;
}

.space {
  width: 8px;
}

.preview-container {
  position: relative;
}

.logograph-preview {
  margin-top: 10px;
  border-top: 1px solid #ddd;
  padding-top: 10px;
}

.original-text {
  display: none;
}

[title] {
  position: relative;
}

[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 1000;
}

.reply-form {
  margin-left: 50px;
  margin-top: 10px;
  background: #f8f9fa;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.reply-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  resize: vertical;
  min-height: 80px;
  margin-bottom: 10px;
}

.reply-form button {
  background: #1877f2;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.replies {
  margin-left: 50px;
  margin-top: 10px;
}

.reply {
  background: #f8f9fa;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 10px;
  border: 1px solid #ddd;
}

.cancel-reply {
  background: #e4e6eb;
  color: #050505;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  margin-left: 8px;
}

.cancel-reply:hover {
  background: #d8dadf;
}

.notifications {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 300px;
  z-index: 1000;
}

.notification {
  background: white;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 10px;
  animation: slideIn 0.3s ease-out;
  border-left: 4px solid #1877f2;
}

.notification-header {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.notification-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin-right: 10px;
}

.notification-content {
  flex: 1;
  font-size: 0.9em;
  line-height: 1.4;
}

.notification-close {
  background: none;
  border: none;
  color: #65676b;
  cursor: pointer;
  padding: 4px;
  margin-left: 8px;
}

.notification-close:hover {
  color: #1877f2;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.notification-badge {
  background: #1877f2;
  color: white;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 12px;
  margin-left: 5px;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 8px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.profile-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #ddd;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin-right: 20px;
}

.profile-info {
  flex: 1;
}

.profile-username {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 10px;
}

.profile-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.stat {
  text-align: center;
}

.stat-value {
  font-size: 18px;
  font-weight: bold;
  color: #1877f2;
}

.stat-label {
  font-size: 14px;
  color: #65676b;
}

.close-modal {
  position: absolute;
  right: 20px;
  top: 20px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #65676b;
}

.close-modal:hover {
  color: #1877f2;
}

.profile-posts {
  margin-top: 20px;
}

.modal-content .post {
  margin-bottom: 10px;
}

.profile-heading {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ddd;
}

.profile-planet {
  margin: 10px 0;
  color: #65676b;
  font-size: 0.9em;
}

.planet-edit {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.planet-input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  flex: 1;
  font-size: 14px;
}

.planet-display {
  display: flex;
  align-items: center;
  gap: 8px;
}

.add-planet,
.edit-planet,
.save-planet,
.cancel-planet {
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  border: none;
}

.add-planet,
.edit-planet {
  background: #e4e6eb;
  color: #050505;
}

.save-planet {
  background: #1877f2;
  color: white;
}

.cancel-planet {
  background: #e4e6eb;
  color: #050505;
}

.add-planet:hover,
.edit-planet:hover {
  background: #d8dadf;
}

.save-planet:hover {
  background: #166fe5;
}

.cancel-planet:hover {
  background: #d8dadf;
}

.info-section {
  background: white;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  color: #1c1e21;
  line-height: 1.4;
}

.info-section .logographic-text {
  max-width: 100%;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
}

.info-icon {
  color: #1877f2;
  font-size: 24px;
  margin-right: 10px;
  display: flex;
  align-items: center;
}

.info-content {
  padding: 10px;
  background: #f0f2f5;
  border-radius: 6px;
  margin-top: 10px;
}

.info-heading {
  display: flex;
  align-items: center;
  font-weight: bold;
  font-size: 1.1em;
  margin-bottom: 10px;
}

.news-toggle {
  background: #1877f2;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  margin-left: 10px;
}

.news-toggle:hover {
  background: #166fe5;
}

.news-sidebar {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 300px;
  background: white;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: transform 0.3s ease;
  padding: 20px;
  overflow-y: auto;
}

.news-sidebar.open {
  transform: translateX(0);
}

.news-sidebar:not(.open) {
  transform: translateX(100%);
}

.news-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ddd;
}

.news-title {
  font-size: 1.2em;
  font-weight: bold;
  color: #1877f2;
}

.close-news {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #65676b;
  padding: 0;
}

.close-news:hover {
  color: #1877f2;
}

.news-content {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.news-item {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.news-item-content {
  margin-bottom: 8px;
  line-height: 1.4;
}

.news-item-timestamp {
  color: #65676b;
  font-size: 0.9em;
}

.news-loading {
  text-align: center;
  color: #65676b;
  padding: 20px;
}

.placeholder-text {
  display: inline-block;
  background: #eee;
  border-radius: 4px;
  height: 40px;
  min-width: 40px;
  margin: 0 4px;
  vertical-align: middle;
  color: transparent;
  user-select: none;
  animation: shimmer 1s infinite linear;
  background: linear-gradient(
    90deg,
    #f0f0f0 0%,
    #f8f8f8 50%,
    #f0f0f0 100%
  );
  background-size: 200% 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.post-timestamp .placeholder-text {
  height: 24px;
  min-width: 24px;
}

.post-actions .placeholder-text {
  height: 30px;
  min-width: 30px;
}

.post-user .placeholder-text {
  height: 35px;
  min-width: 35px;
}

.title .placeholder-text {
  height: 60px;
  min-width: 60px;
}

.welcome .placeholder-text {
  height: 30px;
  min-width: 30px;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.update-log {
  background: white;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  color: #1c1e21;
  line-height: 1.4;
}

.update-log-header {
  display: flex;
  align-items: center;
  font-weight: bold;
  font-size: 1.1em;
  margin-bottom: 10px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 10px;
}

.update-icon {
  font-size: 24px;
  margin-right: 10px;
  display: flex;
  align-items: center;
}

.update-log-content {
  padding: 10px;
}

.update-item {
  background: #f8f9fa;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 10px;
}

.update-details {
  margin-top: 8px;
  color: #65676b;
  padding-left: 10px;
  border-left: 3px solid #1877f2;
}

.no-updates {
  color: #65676b;
  text-align: center;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 6px;
}

.image-upload {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #ddd;
}

.image-upload-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #e4e6eb;
  color: #050505;
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.image-upload-button:hover {
  background: #d8dadf;
}

.image-preview {
  position: relative;
  margin-top: 10px;
}

.image-preview img {
  max-width: 100%;
  max-height: 300px;
  border-radius: 8px;
}

.remove-image {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
}

.remove-image:hover {
  background: rgba(0, 0, 0, 0.8);
}

.post-image {
  margin: 10px 0;
  border-radius: 8px;
  max-width: 100%;
  max-height: 300px;
}

.image-upload-input {
  display: none;
}